package com.varton;

import com.varton.decorator.Belong;
import com.varton.decorator.IpAddrWapper;
import com.varton.decorator.IpBelong;

/**
 *
 * @author varton
 */
public class App {
    public static void main(String[] args) {
        //增强前
        Belong b = new IpBelong();
        String r = b.belong("10.53.156.146");
        System.out.println(r);

        //增加后
        Belong b2 = new IpAddrWapper(b);
        r = b.belong("10.53.156.146");
        System.out.println(r);
        r = b2.belong("80::61:d4:e1:d3");
        System.out.println(r);
    }
}